<template>
	<view class="hot">
		<view class="box1">
			<uni-nav-bar  left-icon="left" fixed class="custom-nav-bar"  title="" :status-bar="true" :background-color="scrollDistance>50?'#fff':'#00000000'" color="#000" :border='false'>
			</uni-nav-bar>
			<view class="">
				<view class="">
					<view class="">
						热销 <text>商品</text>
					</view>
					<view class="">
						精选平台热销商品 . 每日更新
					</view>
				</view>
				<view class="">
					<image :src="imageUrl + 'classification9.png'" mode=""></image>
				</view>
			</view>
			<view class="">
				<view class="filter">
					<view class="dis">推荐</view>
					<view>高佣金</view>
					<view>热销</view>
					<view>价格</view>
				</view>
				<view class="list">
					<view class="" v-for="item in 10">
						<image src="/static/logo.png" mode=""></image>
						<view class="">
							<view class="">
								诗泊雅女家用梳樱花粉蓬松排骨梳高颅顶排骨梳子大弯发梳按摩...
							</view>
							<text>
								CC日用小店
							</text>
							<view class="">
								<view class="">
									<view class="">
										赚 ￥<text>4.95</text>
									</view>
									<view class="">
										售价￥9.9 佣金率50%
									</view>
								</view>
								<view class="">
									加橱窗
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import { ref, getCurrentInstance } from 'vue';
	import { onPageScroll } from '@dcloudio/uni-app';
	const scrollDistance = ref(0);
	const { appContext } = getCurrentInstance();
	const imageUrl = appContext.config.globalProperties.$imageUrl
	onPageScroll((e) => {
	    scrollDistance.value = e.scrollTop;
	});
	let popup = ref('')
	const opens = ()=>{
			popup.value.open()
	}
</script>

<style lang="scss" scoped>
	.box1{
		width: 100%;
		// height: 400rpx;
		padding-bottom: 36rpx;
		background-image: url('http://mdomall.oss-cn-hangzhou.aliyuncs.com/static/bg4.png');
		background-repeat: no-repeat;
		background-size: 100% 100%;
		>view:nth-child(2){
			display: flex;
			padding: 0 33rpx;
			justify-content: space-between;
			padding-top: 30rpx;
			>view:nth-child(1){
				>view:nth-child(1){
					font-size: 40rpx;
					font-weight: 400;
					color: rgba(42, 42, 42, 1);
					text{
						color: rgba(255, 81, 33, 1);
					}
				}
				>view:nth-child(2){
					font-size: 24rpx;
					color: rgba(153, 153, 153, 1);

				}
			}
			>view:nth-child(2){
				>image{
					width: 200rpx;
					height: 150rpx;
				}
			}
		}
		>view:nth-child(3){
			background-color:#fff;
			min-height:90vh;
			border-top-right-radius: 30rpx;
			border-top-left-radius: 30rpx;
			transform: translateY(-6rpx);
			padding: 36rpx 32rpx;
			.filter{
				display: flex;
				align-items:center;
				box-sizing: border-box;
				>view{
					margin-right: 56rpx;
					font-size: 28rpx;
					font-weight: 400;
					color: rgba(106, 106, 106, 1);
			
				}
				.dis{
					font-size: 28rpx;
					font-weight: 700;
					color: rgba(42, 42, 42, 1);
			
				}
			}
			.list{
				padding-top: 10rpx;
				>view{
					display: flex;
					padding: 32rpx 0;
					border-bottom: 1px solid rgba(238, 238, 238, 1);
					image{
						width: 240rpx;
						height: 240rpx;
						flex-shrink: 0;
						margin-right: 16rpx;
					}
					>view{
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						>view:nth-child(1){
							font-size: 28rpx;
							font-weight: 700;
							color: rgba(42, 42, 42, 1);
						}
						>text{
							font-size: 24rpx;
							color: rgba(106, 106, 106, 1);
						}
						>view:nth-child(3){
							display: flex;
							align-items: flex-end;
							justify-content: space-between;
							>view:nth-child(1){
								>view:nth-child(1){
									font-size: 24rpx;
									font-weight: 700;
									color: rgba(252, 80, 0, 1);
									text{
										/** 文本3 */
										font-size: 36rpx;
										font-weight: 700;
										color: rgba(252, 80, 0, 1);
									}
								}
								>view:nth-child(2){
									font-size: 24rpx;
									color: rgba(106, 106, 106, 1);
								}
							}
							>view:nth-child(2){
								font-size: 28rpx;
								font-weight: 700;
								color: rgba(255, 255, 255, 1);
								border-radius: 80rpx;
								background: rgba(255, 127, 6, 1);
								padding: 11rpx 38rpx;
							}
						}
					}
				}
			}
		}
	}
</style>